<!DOCTYPE html>
<html>
<head>
	<title></title>
</head>
<body>
	<img src="" a="999" id="ll">

</body>
<script type="text/javascript">
/*
porperty:prop标准属性id,class,href,title,alt,src,width,value...
attribute:attr自定义属性
--获取：dom.getAttribute()
--设置：dom.setAttribute()
--检测：dom.hasAttribute();有就返回true没有false
----dom.hasAttributes();返回true/false
--全部属性：dom.attributes(),集合,长度：.length
 */ 
function $(s){
	return document.querySelectorAll(s);
}
var arrDom=$("myDiv").attribute;
console.log(arrDom); 
console.log($("#ll")[0].getAttribute("a"));

</script>
</html>